## 基础镜像
#FROM eclipse-temurin:8
## 作者
#MAINTAINER hlh
## 工作目录
#WORKDIR /usr/local/java
## 同步docker内部的时间
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
## 设置时区
#ENV TZ=Asia/Shanghai
#EXPOSE 8081
## 复制jar包到/user/local/java下
#ARG JAR_FILE
#ADD ${JAR_FILE} ./deliciousFoods.jar
#
#ENTRYPOINT ["nohup","java","-Dspring.config.location=/usr/local/java/application.yml","-jar","/usr/local/java/deliciousFoods.jar",">","/usr/local/java/deliciousFoods.log","&>","&"]


# 基础镜像
FROM eclipse-temurin:8
# 作者
MAINTAINER hlh
# 工作目录
WORKDIR /usr/local/java
# 同步docker内部的时间
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 设置时区
ENV TZ=Asia/Shanghai
EXPOSE 8081
# 复制jar包到/user/local/java下
ARG JAR_FILE
ADD ${JAR_FILE} ./deliciousfoods.jar

ENTRYPOINT ["nohup","java","-Dspring.profiles.active=online","-Dspring.config.location=/usr/local/java/application.yml,/usr/local/java/application-online.yml","-jar","/usr/local/java/deliciousfoods.jar",">","/usr/local/java/deliciousfoods.log","&>","&"]
